<?php
	class CategoryModel extends Model{
		// 获得分类表数据
		public function getDataAll(){
			$category=M('Category');
			$data=$category->select();
			import('ORG.Util.Data');
			$rows=Data::channel($data, $fieldPri = 'cid', $fieldPid = 'pid', $pid = 0, $sid = null, $type = 2, $html = "-");//扩展类Data.class.php 中用于无限级分类的静态方法channel()
			return $rows;
		}

		// 获得单条数据
		public function getData($id){
			$category=M('Category');
			$row=$category->find($id);
			return $row;
		}

		
	}
?>